﻿@{
    Layout = null;
    var teacherInfo = Model;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>工资明细</title>
    <link rel="stylesheet" href="~/layui-v2.5.5/layui/css/layui.css" media="all">
</head>
<body>
    <fieldset class="layui-elem-field" style="margin: 20px">
        <legend>我的工资</legend>
        <div class="layui-field-box">
    <form id="wagedetail" class="layui-form layui-form-pane" action="" lay-filter="ShowWageDetail" style="margin:20px">
        <div class="layui-form-item  ">
            <label class="layui-form-label">教师ID</label>
            <div class="layui-input-block">
                <input type="text" name="teacherid" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">工资日期</label>
            <div class="layui-input-block">
                <input type="text" name="wagetime" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">基本工资</label>
            <div class="layui-input-block">
                <input type="text" name="basicwage" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">加班工资</label>
            <div class="layui-input-block">
                <input type="text" name="overtimewage" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">福利工资</label>
            <div class="layui-input-block">
                <input type="text" name="welfare" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">全勤工资</label>
            <div class="layui-input-block">
                <input type="text" name="bonus" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  ">
            <label class="layui-form-label">总工资</label>
            <div class="layui-input-block">
                <input type="text" name="totalwage" readonly class="layui-input">
            </div>
        </div>
    </form>
        </div>
    </fieldset>


    <script src="~/layui-v2.5.5/layui/layui.all.js"></script>
    <script src="~/js/jquery.js"></script>
    <script>
        layui.use(['form', 'laydate'], function () {
            var form = layui.form;
            var WageData;
            $.ajax({
                url: '/Api/QueryTeacherWage',
                data: {
                    teacherid: "@teacherInfo.Teacherid"
                    , time: "@ViewData["time"]"
                    , year: "000"
                    },
                type: "GET",
                dataType: "JSON",
                success: function (data) {
                    WageData = data;
                    form.val('ShowWageDetail', {
                        "teacherid": WageData.wageList[0].teacherid
                        , "wagetime": WageData.wageList[0].wagetime.substring(0,7)
                        , "basicwage": WageData.wageList[0].basicwage
                        , "overtimewage": WageData.wageList[0].overtimewage
                        , "welfare": WageData.wageList[0].welfare
                        , "bonus": WageData.wageList[0].bonus
                        , "totalwage": WageData.wageList[0].totalwage
                    });
                }
                })
            });
    </script>
</body>
</html>